﻿<phone:PhoneApplicationPage 
    x:Class="DevPhoneToolkitSample.Samples.ListPickerPageSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:DevPhone="clr-namespace:DevPhone.Controls;assembly=DevPhone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel>
            <Border Background="White" VerticalAlignment="Top" BorderBrush="Gray" BorderThickness="1">
                <Image Name="Logo" Source="/DevPhoneToolkitSample;component/Images/DevPhoneToolkit.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left" />
            </Border>
        </StackPanel>
        <Grid x:Name="ContentPanel" Grid.Row="1">
            <ScrollViewer>
                <StackPanel Margin="12,20,0,0">
                    <StackPanel >
                        <TextBlock Text="ListPickerPage Sample" FontSize="32"/>
                    </StackPanel>
                    <StackPanel Margin="0,15,0,0">
                        <DevPhone:ListPickerPageControl SelectedIndex="0" Margin="0,10" Header="Basic" PageHeader="Choose Item">
                            <DevPhone:ListPickerPageControl.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Margin="0,10" FontSize="26"/>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.ItemTemplate>
                            <DevPhone:ListPickerItem Content="Item1"/>
                            <DevPhone:ListPickerItem Content="Item2"/>
                            <DevPhone:ListPickerItem Content="Item3"/>
                            <DevPhone:ListPickerItem Content="Item4"/>
                            <DevPhone:ListPickerItem Content="Item5"/>
                        </DevPhone:ListPickerPageControl>
                        <DevPhone:ListPickerPageControl SelectedIndex="0" Margin="0,10">
                            <DevPhone:ListPickerPageControl.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Margin="0,10" FontSize="26"/>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.ItemTemplate>
                            <DevPhone:ListPickerPageControl.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock Text="Custom Header" FontSize="22" FontWeight="Bold" Foreground="Red"/>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.HeaderTemplate>
                            <DevPhone:ListPickerPageControl.PageHeaderTemplate>
                                <DataTemplate>
                                    <TextBlock Text="Custom Page Header" FontSize="32" Foreground="Blue"/>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.PageHeaderTemplate>
                            <DevPhone:ListPickerItem Content="Item1"/>
                            <DevPhone:ListPickerItem Content="Item2"/>
                            <DevPhone:ListPickerItem Content="Item3"/>
                            <DevPhone:ListPickerItem Content="Item4"/>
                            <DevPhone:ListPickerItem Content="Item5"/>
                        </DevPhone:ListPickerPageControl>
                        <DevPhone:ListPickerPageControl SelectedIndex="0" Margin="0,10" Header="Custom Selected" PageHeader="Choose Item">
                            <DevPhone:ListPickerPageControl.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Margin="0,10" FontSize="26"/>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.ItemTemplate>
                            <DevPhone:ListPickerPageControl.SelectedTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Selected Item: " FontSize="20" Foreground="Blue"/>
                                        <TextBlock Text="{Binding}" FontSize="20" Foreground="Red"/>
                                    </StackPanel>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.SelectedTemplate>
                            <DevPhone:ListPickerItem Content="Item1"/>
                            <DevPhone:ListPickerItem Content="Item2"/>
                            <DevPhone:ListPickerItem Content="Item3"/>
                            <DevPhone:ListPickerItem Content="Item4"/>
                            <DevPhone:ListPickerItem Content="Item5"/>
                        </DevPhone:ListPickerPageControl>
                        <DevPhone:ListPickerPageControl x:Name="Lpk1" Margin="0,10" Header="Data Binding" PageHeader="Choose Item" >
                            <DevPhone:ListPickerPageControl.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal" Margin="0,10">
                                        <Image Source="{Binding Photo}" VerticalAlignment="Center" />
                                        <TextBlock Text="{Binding Name}" Margin="10,0,0,0" VerticalAlignment="Center" FontSize="26" />
                                    </StackPanel>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.ItemTemplate>
                            <DevPhone:ListPickerPageControl.SelectedTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{Binding Photo}" VerticalAlignment="Center" />
                                        <TextBlock Text="{Binding Name}" Margin="10,0,0,0" VerticalAlignment="Center"  />
                                    </StackPanel>
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.SelectedTemplate>
                        </DevPhone:ListPickerPageControl>
                        <DevPhone:ListPickerPageControl SelectedIndex="0" Margin="0,10" Header="Colors" PageHeader="Choose Item" PageBackground="Orange" ControlBackground="#BFD11B1B" ControlForeground="#FFFFD90A" BorderThickness="2" BorderBrush="#FF00FFEB">
                            <DevPhone:ListPickerPageControl.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Margin="0,10" FontSize="26" />
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.ItemTemplate>
                            <DevPhone:ListPickerItem Content="Item1"/>
                            <DevPhone:ListPickerItem Content="Item2"/>
                            <DevPhone:ListPickerItem Content="Item3"/>
                            <DevPhone:ListPickerItem Content="Item4"/>
                            <DevPhone:ListPickerItem Content="Item5"/>
                        </DevPhone:ListPickerPageControl>
                        <DevPhone:ListPickerPageControl SelectedIndex="0" Margin="0,10" Header="Custom Image Page" PageHeader="Choose Item" >
                            <DevPhone:ListPickerPageControl.PageImageBackground>
                                <ImageBrush ImageSource="/DevPhoneToolkitSample;component/Images/BGRJ.png" Stretch="UniformToFill" />
                            </DevPhone:ListPickerPageControl.PageImageBackground>
                            <DevPhone:ListPickerPageControl.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Margin="0,10" FontSize="26" />
                                </DataTemplate>
                            </DevPhone:ListPickerPageControl.ItemTemplate>
                            <DevPhone:ListPickerItem Content="Item1"/>
                            <DevPhone:ListPickerItem Content="Item2"/>
                            <DevPhone:ListPickerItem Content="Item3"/>
                            <DevPhone:ListPickerItem Content="Item4"/>
                            <DevPhone:ListPickerItem Content="Item5"/>
                        </DevPhone:ListPickerPageControl>
                    </StackPanel>
                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
